package com.hdl.school.bean;

import java.text.SimpleDateFormat;
import java.util.Date;

public class SerialMessage {
    private String time;
    private String port;
    private String message;
    private String direction;


    public SerialMessage(){

    }

    public SerialMessage(String port, String message, String direction) {
        Date nowTime=new Date();
        SimpleDateFormat time=new SimpleDateFormat("HH:mm:ss.SSS");
        this.time = time.format(nowTime);
        this.port=port;
        this.message = message;
        this.direction = direction;
    }



    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getDirection() {
        return direction;
    }

    public void setDirection(String direction) {
        this.direction = direction;
    }
}
